home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / MacRuntime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-05  |  2.5 KB  |  108 lines  |  [TEXT/MPS ]

  1. /*
  2. #
  3. #    File:        MacRuntime.h.txt
  4. #
  5. #    Contains:    xxx put contents here xxx
  6. #
  7. #    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  8. #
  9. #    Version:    xxx put the technology version here xxx
  10. #
  11. #    File Ownership:
  12. #
  13. #        DRI:                Vladimir Gitlevich
  14. #
  15. #        Other Contact:        xxx put alternate contact (owner’s functional manager) here xxx
  16. #
  17. #        Technology:            xxx put the technology group name here xxx
  18. #
  19. #    Writers:
  20. #
  21. #        (VG)    Vladimir Gitlevich
  22. #
  23. #    Change History (most recent first):
  24. #
  25. #        <13>     7/25/95    VG        putting comments around NRHeader (it should be done
  26. #                                    automatically!)
  27. #        <12>     7/25/95    VG        types.h -> Types.h (it's case sensitive!)
  28. #
  29. #
  30. */
  31.  
  32. /*
  33.  *    MacRuntime.h
  34.  *    C Interface to the Macintosh Programmer's Workshop Libraries
  35.  *
  36.  * © Copyright Apple Computer Inc. 1993-1995
  37.  * All rights reserved.
  38.  *
  39.  * Warning:  This interface is NOT a part of the ANSI C standard.
  40.  *             We do NOT claim to be POSIX compliant.  If you want
  41.  *             your code to be portable, don't use this interface.
  42.  */
  43.  
  44. /* Conditional Macros:
  45.  *    UsingStaticLibs    - for CFM-68K:  Insures that #pragma import is never used.
  46.  *    <none>            - for CFM-68K:    Insures that all functions and data items are
  47.  *                                    marked as library imports
  48.  */
  49.  
  50. #ifndef __MACRUNTIME__
  51. #define __MACRUNTIME__    1
  52.  
  53.  
  54. #include <Types.h>
  55.  
  56. #if defined(__CFM68K__) || defined(__powerc)
  57. #include <CodeFragments.h>        /* For "CFragInitBlockPtr". */
  58. #endif /* __CFM68K__ || __powerc */
  59.  
  60. #if defined(__powerc)
  61. #include <Memory.h>                /* For "THz". */
  62. #endif /* __powerc */
  63.  
  64. #ifdef __cplusplus
  65. extern "C" {
  66. #endif
  67.  
  68. /* Program Initialization and Termination */
  69.  
  70. int _RTInit(ProcPtr retPC, int *pArgC, char ***pArgV, char ***pEnvP, int forPascal);
  71. void _RTExit(int status);
  72.  
  73. /* Utility Routine */
  74.  
  75. pascal Boolean TrapAvailable (short TrapNumber);
  76.  
  77. #if defined(__CFM68K__) || defined(__powerc)
  78.  
  79. /* Default code fragment initialization and termination entry points.        */
  80. /* Needed for CFM applications or shared libraries containing C++ code.        */
  81.  
  82. extern OSErr    __init_app(CFragInitBlockPtr initBlockPtr);
  83. extern void        __term_app(void);
  84. extern OSErr    __init_lib(CFragInitBlockPtr initBlockPtr);
  85. extern void        __term_lib(void);
  86.  
  87. #endif /* __CFM68K__ || __powerc */
  88.  
  89. #if defined(__powerc)
  90. /* Types and functions for use in PowerMac CFM termination routines. */
  91.  
  92. struct CFragWorld {
  93.     THz heapZone;
  94.     long emulatorA5;
  95.     int unused;
  96. };
  97.  
  98. typedef struct CFragWorld CFragWorld, *CFragWorldPtr;
  99.  
  100. extern void __RestoreInitialCFragWorld(CFragWorldPtr oldCFragWorld);
  101. extern void __RevertCFragWorld(CFragWorldPtr oldCFragWorld);
  102.  
  103. #endif /* __powerc */
  104.  
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif